﻿using StudentBackendService.ViewObjects;
using StudentBackendService.ViewObjects.Req;
using StudentManagerService.Models;

namespace StudentManagerService.Controllers
{
    public interface IStudentAPI
    {
        /// <summary>
        /// 添加学生
        /// </summary>
        /// <param name="student">输入的学生信息</param>
        /// <returns>插入后带有ID的学生信息实体类</returns>
        /// <response code="200">添加成功</response>
        Response AddOne(Student input);

        /// <summary>
        /// 根据ID查询单个学生的信息
        /// </summary>
        /// <param name="id">学生id</param>
        /// <returns>Student实体类</returns>
        /// <response code="200">查询成功</response>
        /// <response code="404">学生ID不存在，无法查询</response>
        Response GetById(int id);

        /// <summary>
        /// 按照条件查询学生列表
        /// </summary>
        /// <param name="email">学生注册的邮箱</param>
        /// <param name="name">学生名字</param>
        /// <param name="page">第几页</param>
        /// <param name="size">每页多少条</param>
        /// <returns></returns>
        public Response List(string? email, string? name, int page, int size);
    }
}
